Converts any string or numeric expression to data type Single.
文字列および数値表式を、単精度の数値データに変換します。
CSng (Expression)
CSng (Expression)
Single
単精度
Expression: Any string or numeric expression that you want to convert. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system.
Expression: 日付データに変換する文字列および数値表式。また文字列を変換する場合は、オペレーティングシステムが標準で使用する数の書式 (「123.5」など) でテキストを指定する必要があります。
Sub ExampleCSNG
Sub ExampleCSNG
Msgbox CDbl(1234.5678)
Msgbox CDbl(1234.5678)
Msgbox CInt(1234.5678)
Msgbox CInt(1234.5678)
Msgbox CLng(1234.5678)
Msgbox CLng(1234.5678)
Msgbox CSng(1234.5678)
Msgbox CSng(1234.5678)
end sub
end sub